package com.rutong.user.controller;


import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Created by han_l on 2016/8/24.
 */
public class LoginController implements Controller {

//    @RequestMapping("/login")
//    public ModelAndView login(String name, String pwd) {
//        ModelAndView modelAndView = new ModelAndView();
//        modelAndView.addObject("hello", "你好，世界");
//        modelAndView.setViewName("/WEB-INF/hello.jsp");
//        return modelAndView;
//    }

    public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
        ModelAndView mv = new ModelAndView();
        mv.addObject("message", "HelloWorld");
        mv.setViewName("/hello");
        return mv;
    }
}
